<!DOCTYPE html>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="gb2312">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link type="text/css" href="css/main.css" rel="stylesheet">
    <link type="text/css" href="css/0001245c2.css" rel="stylesheet">
    <title>商家审核</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="referrer" content="never">
    <!--<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">-->
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../plugins/adminLTE/css/AdminLTE.css">
    <link rel="stylesheet" href="../plugins/adminLTE/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="../css/style.css">
	<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
    <script src="../plugins/bootstrap/js/bootstrap.min.js"></script>

</head>
<head>

</head>
<body>
<div id="e_background">
    <div id="e_smallstars"></div>
    <div id="e_moon"></div>
</div>
<div id="container">
	<div class="search bar7">
			<div class="input-group input-group-lg">

				<input type="text" placeholder="图片搜索" style="margin-left: 50px;margin-top: 50px" id="keywords">
				<button  id="search">Go</button>
			</div>
			<span id="noPic" hidden style="color: red;margin-left: 50px;margin-top: 50px">无图片!</span>
			<br>
        <div id="imgList">
        </div>

	</div>


</div>
<script>
	$("#search").click(function () {
	    var keywords = $("#keywords").val();
        $.get("http://localhost:8080/img/getImg", {keywords:keywords}, function (data) {
            if(data&&data.length>0){
                $("#noPic").hide();
                var  a = [];

                $.each(data, function(){
                    var b = "<img src='"+this+"' style='width: 45%'>\n" ;
                    a.push(b);
                });
            $("#imgList").empty();
            $("#imgList").append(a.join(""))
            }else {
                $("#noPic").show();
            }
        })

    })
</script>
</body>
</html>